package com.myway.front.controller;

import com.alibaba.fastjson.JSON;
import com.myway.front.pojo.TabMemberInfo;
import com.myway.front.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/member")
public class MemberController {
    @Autowired
    private MemberService memberService;
    @RequestMapping("/addMember")
    public String addMember(TabMemberInfo tabMemberInfo){
        System.out.println("=="+JSON.toJSON(tabMemberInfo));
        memberService.addMember(tabMemberInfo);
        return "login";
    }
    @RequestMapping("/membLogin")
    public String membLogin(String membPhoneNum,String membPwd){
        System.out.println("zhanghao :"+membPhoneNum+"  mima:"+membPwd);
        return memberService.membLogin(membPhoneNum,membPwd);
    }
}
